package com.jimikongjian.service.base;

import com.jimikongjian.models.Comment;
import com.jimikongjian.models.ResponseMessage;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Created by fuxiuyang on 17/3/4.
 */
public interface ICommentService {

    /**
     * 创建一条新的评论内容
     * @param comment
     * @return
     */
    public ResponseMessage createComment(Comment comment);


    /**
     * 查询评论信息
     * @param articleId
     * @return
     */
    public ResponseMessage selectComment(int articleId, int start, int length);

    /**
     * 通过某个文章的id和被评论者的id评论
     * @param articleId
     * @param start
     * @param length
     * @return List<Comment>
     */
    public ResponseMessage selectCommentListByArticleIdAndCommentParentId( int articleId, int commentParentId, int start, int length);

    /**
     * 通过某个文章的id和评论者的id获取评论
     * @param articleId
     * @param start
     * @param length
     * @return List<Comment>
     */
    public ResponseMessage selectCommentListByArticleIdAndCommentId(int articleId, int commentId, int start, int length);

}
